package com.alex.statistics.pojo.request.structureanalysis;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.util.List;

/**
 * 动态结构分析请求参数
 */
@Data
public class DynamicStructureRequest {

    // 结构变化指数请求参数（内部类）
    @Data
    @Schema(description = "结构变化指数请求参数")
    public static class StructureChangeIndexRequest {
        @Schema(description = "各组成部分的名称", required = true, example = "[\"原材料\",\"人工\",\"设备\",\"杂费\"]")
        private List<String> componentNames;

        @Schema(description = "基期（对比基准期）各部分的数值", required = true, example = "[200, 300, 150, 50]")
        private List<Double> basePeriodValues;

        @Schema(description = "报告期（当前分析期）各部分的数值", required = true, example = "[250, 350, 180, 70]")
        private List<Double> reportPeriodValues;
    }

    // 贡献度分析请求参数（内部类）
    @Data
    @Schema(description = "贡献度分析请求参数")
    public static class ContributionRequest {
        @Schema(description = "各影响因素的名称", required = true, example = "[\"销量\",\"单价\",\"成本\"]")
        private List<String> factorNames;

        @Schema(description = "基期各因素的数值", required = true, example = "[100, 50, 30]")
        private List<Double> basePeriodFactors;

        @Schema(description = "报告期各因素的数值", required = true, example = "[120, 55, 28]")
        private List<Double> reportPeriodFactors;

        @Schema(description = "基期整体总值（如总利润）", required = true, example = "2000.0")
        private Double basePeriodTotal;

        @Schema(description = "报告期整体总值", required = true, example = "3200.0")
        private Double reportPeriodTotal;
    }
}
    